<!DOCTYPE html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/html">

<head>
	<meta charset="UTF-8">
	<title>订餐</title>
</head>

<body>
<a href="{$base_url.base_url}diner/shop/{$mid}">返回点单</a><br>

<ul>
	{if $orders != NULL}
		{foreach $orders as $dish}
			<li>菜名: {$dish['dname']}</li>
			<li>价格: {$dish['price']}</li>
			<li>折扣: {$dish['discount']}</li>
			<li>份数: {$dish['number']}</li>
			<br>
		{/foreach}
		总价：{$money}<br>
	{else}
		订单为空
	{/if}

	<form action="{$base_url.base_url}diner/order/{$mid}" method="post">
		<table>
			<tr>
				<th>选择</th>
				<th>收货地址</th>
				<th>收货人</th>
				<th>收获人电话</th>
			</tr>
			{foreach $addrs as $addr}
			<tr>
				<td><input type="radio" name="addr" value="{$addr->id}"></td>
				<td>{$addr->addr}</td>
				<td>{$addr->rname}</td>
				<td>{$addr->phone_number}</td>
			</tr>
			{/foreach}
		</table>
		{if $orders != NULL}
			<button type="submit" name="submit" value="true">
				<span>下单</span>
			</button>
		{/if}
		<a href="{$base_url.base_url}diner/addaddr/{$mid}">
			<input type="button" value="新增收货地址">
		</a>
	</form>

</ul>
</body>

</html>
